{extend name="friend/friend-list"}
{block name="friend"}
<!--搜索显示可能认识的好友-->
<script>
    $(document).ready(function () {
        $.ajax({
            type: 'get',
            url: '/Friend/Search_MayK_Friend',
            dataType: 'json',
            success: function (data) {
                console.log(data);
            }
        });
    });
</script>
<!--搜索显示可能认识的好友结束-->

<script type="text/javascript">
    $('li.menuFriendClass').addClass('actived');
    $('a.submenuFriendAdd').addClass('actived');
    $(':text,textarea').mouseover(function () {
        $(this).focus();
    });
    function switchSearchForms(form) {
        $("form[name^='search_form_']").hide();
        $("form[name='search_form_" + form + "']").show();
    }
    //  加载搜索好友结果
    $(function () {
        $('#sub').click(function () {
            var info = $('#dema').val();
            $.ajax({
                type: 'post',
                url: '/Friend/Search_Friend',
                data: {"domain": info},
                dataType: 'json',
                success: function (data) {
                    for (var i = 0; i < data.length; i++) {
                        $('#friends' + i).html(data[i].name);
                        $('#addFiend' + i).html('加为好友');
                    }
                },
                error: function () {
                    console.log('请求失败');
                }
            })
        });
    });
    //  END

</script>
<style type="text/css">
    .nav ul li.sousuo a {
        background: #fff;
        color: #90c044;
        -webkit-border-radius: 5px 5px 0 0;
        -moz-border-radius: 5px 5px 0 0;
        border-radius: 5px 5px 0 0;
    }

    .container {
        font-size: 14px;
    }
</style>
<div class="content">
    <div class="container">
        <div><span style="color:#90c044;">查找站内好友</span></div>
        <div class="friend-search">
            <div>
                <input name="search_type_switch" type="radio" value="blogurl" onclick="switchSearchForms(this.value);">
                博客名称&nbsp;&nbsp;&nbsp;
            </div>
            <br/>
            <div>
                <!--<form name='search_form_blogurl'>-->
                博客名称：<input id="dema" type="text" style="width:100px; margin-bottom:1px; color:#999;"/>
                <button id="sub" button="submit" class="btn btn-primary" data-toggle="collapse"
                        data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">查找
                </button>

            </div>
            <br/>

            <!--搜索结果显示框-->
            <div class="collapse" id="collapseExample">
                <div class="well">

                    <div class="row">
                        <div class="col-md-6" id="friends0"></div>
                        <div class="col-md-6" id="addFiend0"></div>
                    </div>
                    <div class="row">
                        <div class="col-md-6" id="friends1"></div>
                        <div class="col-md-6" id="addFiend1"></div>
                    </div>
                    <div class="row">
                        <div class="col-md-6" id="friends2"></div>
                        <div class="col-md-6" id="addFiend2"></div>
                    </div>
                    <div class="row">
                        <div class="col-md-6" id="friends3"></div>
                        <div class="col-md-6" id="addFiend3"></div>
                    </div>
                    <div class="row">
                        <div class="col-md-6" id="friends4"></div>
                        <div class="col-md-6" id="addFiend4"></div>
                    </div>
                </div>
            </div>
            <!--搜索结果显示框结束-->

            <br/>
            <div><span style="color:#90c044;">你可能认识</span></div>

            <div class="friend-all">
                <div class="file-col">
                    <span>
                        <a href="#" title="J326" target="_blank"><img src="/static/images/avatar_1357293_48.jpg"/></a>
                    </span>
                    <span class="desc">
                            <a href="#" title="J326" target="_blank">J326</a>
                    </span>
                </div>

                <div class="file-col">
                    <span>
                        <a href="#" title="J326" target="_blank"><img src="/static/images/avatar_1357293_48.jpg"/></a>
                    </span>
                    <span class="desc">
                            <a href="#" title="J326" target="_blank">J326</a>
                    </span>
                </div>

                <div class="file-col">
                    <span>
                        <a href="#" title="J326" target="_blank"><img src="/static/images/avatar_1357293_48.jpg"/></a>
                    </span>
                    <span class="desc">
                            <a href="#" title="J326" target="_blank">J326</a>
                    </span>
                </div>

                <div class="file-col">
                    <span>
                        <a href="#" title="J326" target="_blank"><img src="/static/images/avatar_1357293_48.jpg"/></a>
                    </span>
                    <span class="desc">
                            <a href="#" title="J326" target="_blank">J326</a>
                    </span>
                </div>

                <div class="file-col">
                    <span>
                        <a href="#" title="J326" target="_blank"><img src="/static/images/avatar_1357293_48.jpg"/></a>
                    </span>
                    <span class="desc">
                            <a href="#" title="J326" target="_blank">J326</a>
                    </span>
                </div>


<!--可能认识的人结束-->


                            <!--<form method="post" action="/mayknow/delete" name="delete_mayknow" style="display:none;"><input name="REQUEST_METHOD" value="PUT" type="hidden" /><input type="hidden" name="user"/></form>  -->

                            <script type="text/javascript">
                                $(".avatarList04 li").mouseover(function () {
                                    $(this).find(".del").show();
                                });
                                $(".avatarList04 li").mouseout(function () {
                                    $(this).find(".del").hide();
                                });
                            </script>
                        </div>
                    </div>
                </div>
            </div>
            <!--main end-->


            {/block}
